﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CommissionGroupViewer.aspx.cs"
    Inherits="LotteryVote.CommissionGroupViewer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        table td
        {
            border: 1px solid #000;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <table>
        <%foreach (var model in CommissionGroupModelList)
          { %>
        <tr>
            <td>
                <a href='EditCommission.aspx?groupId=<%=model.CommGroup.GroupId %>'>
                    <%=model.CommGroup.GroupName %></a>
            </td>
            <td>
                <table>
                    <tr>
                        <td rowspan="2">
                            GameType
                        </td>
                        <%foreach (var comType in CompanyTypeList)
                          { %>
                        <td colspan="2">
                            <%=comType.TypeName %>
                        </td>
                        <%} %>
                    </tr>
                    <tr>
                        <%for (int i = 0; i < CompanyTypeList.Count; i++)
                          { %>
                        <td>
                            Comm
                        </td>
                        <td>
                            Odds
                        </td>
                        <%} %>
                    </tr>
                    <%foreach (var gameType in GameTypeList)
                      {%>
                    <tr>
                        <td>
                            <%=gameType.GameName%>
                        </td>
                        <%foreach (var comType in CompanyTypeList)
                          { %>
                        <td>
                            <%=GetComm(model,comType,gameType).Commission%>
                        </td>
                        <td>
                            <%=GetComm(model,comType,gameType).Odds%>
                        </td>
                        <%} %>
                    </tr>
                    <%} %>
                </table>
            </td>
        </tr>
        <%} %>
    </table>
    <a href="CommissionManager.aspx">AddCommissionGroup</a>
    </form>
</body>
</html>
